{% extends "base.html" %}
{% load custom_filters %}

{% block title %}Breeding Cages{% endblock title%}

{% block scripts %}{% include "sortable_table_script.html" %}{% endblock scripts %}

{% block header %}Breeding Cages{% endblock header %}

{% block content %}
<h2>{{ breeding_list.count }} breeding cages <a href="/mousedb/breeding/all">(see all)</a></h2>
<p>To enter a new breeding cage click <a href="/mousedb/breeding/new">here</a>.  To see details on a breeding cage click on either the cage number or the number of pups</p>
<p>For information about plug events click <a href="/mousedb/plug/" title="timed matings entry page">here</a>.</p>
<p>Sort table by clicking headers.  Select multiple headers by holding SHIFT</p>
<table class="sortable">
 <thead>
  <tr>
   <th>Strain</th>
   <th>Cage</th>
   <th>Name</th>
   <th>Start</th>
   <th>Rack</th>
   <th>Position</th>
   <th>Duration</th>
   <th>Crosstype</th>
   <th>Pups</th>
   <th id="left">Notes</th>
  </tr>
 </thead>
 <tdata>
  {% for breeding in breeding_list %}
  <tr>
   <td><a href="/mousedb{{ breeding.Strain.get_absolute_url }}">{{ breeding.Strain }}</td>
   <td><a href="/mousedb{{ breeding.get_absolute_url }}">{{ breeding.Cage }}</a></td>
   <td id="left">{{ breeding.BreedingName }}</td>
   <td>{{ breeding.Start }}</td>
   <td>{{ breeding.Rack }}</td>
   <td>{{ breeding.Rack_Position|all_caps }}</td>
   <td id="left">{{ breeding.Start|timesince }}
   <td id="left">{{ breeding.Crosstype }}
   <td><a href="/mousedb{{ breeding.get_absolute_url }}">{{ breeding.animal_set.count }}</a></td>
   <td id="left">{{ breeding.Notes }}</td>
  </tr>
{% endfor%}
 </tdata>
</table>

{% endblock content %}
